-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix mod
for mixes of Signed
and Unsigned
#57853
Conversation
Previously this was just overfowing producing wrong answers (both for the sign convention and just the wrong modulo class) fixes #57851
It should be noted that this changes the return type in these mixed cases, but that does seem like a bug fix. Given that the sign of the result comes from the second argument, it only seems sensible that the signedness also comes from the second argument. In fact, it would be find if the result type was simply the type of the second argument. |
This doesn't change the result type. |
Oh, nvm then. |
(it actually did change the result type, but that was a bug) |
Previously this was just overfowing producing wrong answers (both for the sign convention and just the wrong modulo class)
fixes #57851